# Minimum CMake version required
# g++ -o a llm_run.cpp -L/usr/lib -lrkllmrt
cmake_minimum_required(VERSION 3.14)

# Project name and language
project(RKLLMProject LANGUAGES CXX)

# Set the C++ standard
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# Include directories
include_directories(${CMAKE_SOURCE_DIR}/inc)
include_directories(${CMAKE_SOURCE_DIR}/rkllm_lib)

# Add the library path
link_directories(${CMAKE_SOURCE_DIR}/rkllm_lib)

# Create the library from your source files
add_library(RKLLMTools STATIC src/rkllm_tools.cpp)

# Link the external library (librkllmrt.so)
target_link_libraries(RKLLMTools PRIVATE rkllmrt)

# Add an executable for the test program
add_executable(TestProgram test/main.cpp src/rkllm_tools.cpp)

# Link the test program to your library
# target_link_libraries(TestProgram PRIVATE RKLLMTools rkllmrt)
target_link_libraries(TestProgram PRIVATE RKLLMTools)

# Add an executable for the test program
add_executable(ComparePrompt benchmark/compare_prompt.cpp src/rkllm_tools.cpp)

# Link the test program to your library
# target_link_libraries(TestProgram PRIVATE RKLLMTools rkllmrt)
target_link_libraries(ComparePrompt PRIVATE RKLLMTools)